package com.stlm2.dems.entity.base;

import com.stlm2.dems.entity.IndexConfigType;
import com.stlm2.dems.entity.InventorySource;

/**
 * Created by zlq on 2017/12/19.
 */
public class BaseIndexConfig {
    //
    private int id;
    //类型1:首页标签2:首页轮播图3:功能菜单
    private IndexConfigType type;
    //名字
    private String name;
    //URL
    private String url;
    //图片路径
    private String img;
    //序号
    private int number;
    private String  memo;
    private Boolean state;

    public Boolean getState() {
        return state;
    }

    public void setState(Boolean state) {
        this.state = state;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public IndexConfigType getType() {
        return type;
    }

    public void setType(IndexConfigType type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public Integer getTypeValue(){
        return (type != null) ? type.getIntValue() : null;
    }

    public void setTypeValue(Integer v){
        if(v != null)
            type = IndexConfigType.getByIntValue(v);
    }
}
